package com.macro.mall.ums.enums;

/**
 * 用户来源枚举
 *
 * @author xuyanjun
 * @date 2019-12-09
 */
public enum UserSourceTypeEnum {

    /**
     * 公众号
     */
    WX_MP(10001, "公众号");

    /**
     * 值
     */
    private int value;

    /**
     * 描述
     */
    private String description;

    UserSourceTypeEnum(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public static UserSourceTypeEnum enumOf(int value) {
        for (UserSourceTypeEnum registerSourceEnum : values()) {
            if (value == registerSourceEnum.value) {
                return registerSourceEnum;
            }
        }
        throw new IllegalArgumentException("不合法的AppId。");
    }

    public int getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }
}
